<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="/assets/js/token.js"></script>
    <link rel="stylesheet" href="/assets/lib/layui/css/layui.css">
    <link rel="stylesheet" href="/assets/css/article/art_article.css">
</head>

<body>
    <div class="layui-card">
        <div class="layui-card-header">文章列表</div>
        <div class="layui-card-body">
            <!-- 表单区(搜索区域) -->
            <form class="layui-form" lay-filter="fr">
                <div class="layui-form-item">

                    <div class="layui-inline">
                        <!--第一个下拉框  -->
                        <div class="layui-input-inline" style="width: 200px;" id="selectBox">

                        </div>
                        <!--第二个下拉框  -->
                        <div class="layui-input-inline" style="width: 200px;">
                            <select name="state" lay-verify="">
                                <option value="">请选择状态</option>
                                <option value="已发布">已发布</option>
                                <option value="草稿">草稿</option>
                            </select>
                        </div>
                    </div>

                    <!-- 按钮 -->
                    <div class="layui-inline">
                        <div class="layui-input-inline" style="width: 100px;">
                            <button type="submit" class="layui-btn">筛选</button>
                        </div>
                    </div>

                </div>

            </form>
            <!-- 表格区 -->
            <table class="layui-table">
                <colgroup>
                    <col width="500">
                    <col width="200">
                    <col width="200">
                    <col width="200">
                    <col>
                </colgroup>
                <thead>
                    <tr>
                        <th>文章标题</th>
                        <th>分类</th>
                        <th>发表时间</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>


                </tbody>
            </table>
            <!-- 分页区 -->
            <div id="page"></div>
        </div>
    </div>



    <!-- 表格模板 -->
    <script type="text/html" id="tpl_art">
        {{each data n}}
        <tr>
            <td>{{n.title}}</td>
            <td>{{n.cate_name}}</td>
            <td>{{n.pub_date|getTime}}</td>
            <td>{{n.state}}</td>
            <td>
                <button type="button" data-id="{{n.Id}}" class="layui-btn layui-btn-xs editCatas">编辑</button>
                <button type="button"
                    class="layui-btn layui-btn-danger layui-btn-xs deleteCatas" data-id="{{n.Id}}" id="delArt">删除</button>
            </td>
        </tr>
        {{/each}}
    </script>

    <!-- 下拉框模板 -->
    <script type="text/html" id="tpl_select">
        <select name="cate_id" lay-verify="">
            <option value="">请选择文章类别</option>
            {{each data n}}
            <option value="{{n.Id}}">{{n.name}}</option>
            {{/each}}
        </select>
    </script>

    <script src="/assets/lib/jquery.js"></script>
    <script src="/assets/lib/layui/layui.all.js"></script>
    <script src="/assets/lib/template-web.js"></script>
    <script src="/assets/js/baseAPI.js"></script>
    <script src="/assets/js/article/art_article.js"></script>

</body>

</html>